function a() {

  function b() {
    var num = 1
    console.log(count);
  }
  var count = 2
  return b
}

var c = a()
c()